﻿<%@ Page Language="VB" MasterPageFile="~/masterpages/MaestraEmpadres.master" AutoEventWireup="false"
    CodeFile="Programa.aspx.vb" Inherits="Registro_Programa" Title="Programacion de Empadres" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <link media="screen" rel="stylesheet" href="../Estilos/colorbox.css" />
    <link href="../Estilos/formulario.css" rel="Stylesheet" type="text/css" />

    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js" type="text/javascript"></script>
    <script src="../jscripts/colorbox/jquery.colorbox.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(document).ready(function() {
            //Examples of how to assign the ColorBox event to elements
            $(".detalles").colorbox({ width: "900px", height: "610px", iframe: true});
            $(".crias").colorbox({ width: "900px", height: "610px", iframe: true });
        });
    </script>

</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="Server">
    <center>
        <table width="40%" style="font-family: Calibri, Arial; font-weight: bold; font-size: 16px">
            <tr>
                <td> &nbsp; </td>
            </tr>
            <tr>
                <td class="FormHeaderTD">
                    <asp:Label ID="lblTitulo" runat="server" Text="E M P A D R E S"></asp:Label>
                </td>
            </tr>
        </table>
    </center>

    <br />
    <asp:TextBox ID="txtSalida" runat="server" Width="205px" Visible="False"></asp:TextBox>
    <ajaxToolkit:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server" EnableScriptGlobalization="true">
    </ajaxToolkit:ToolkitScriptManager>

    <asp:Panel ID="pnlParte1" runat="server" BorderWidth="1px" Style="z-index: 106; left: 0px;
        position: relative; top: 0px;">
        <table>
            <tr>
                <td> &nbsp; </td>
                <td> &nbsp; </td>
                <td> &nbsp; </td>
                <td> &nbsp; </td>
                <td> &nbsp; </td>
            </tr>
            <tr>
                <td class="FieldCaptionTD" align="left"> AÑO EMPADRE : </td>
                <td>
                    <asp:DropDownList ID="ddlAno" runat="server" AutoPostBack="True" Style="height: 22px"
                        AppendDataBoundItems="True" Height="24px" Width="60px" TabIndex="1">
                    </asp:DropDownList>
                </td>
                <td> &nbsp; </td>
                <td class="FieldCaptionTD" align="left"> EDAD MINIMA DE TOROS : </td>
                <td>
                    <asp:DropDownList ID="ddlEdadT" runat="server" Style="height: 22px" AppendDataBoundItems="True"
                        Height="24px" Width="60px" TabIndex="0">
                        <asp:ListItem Value="0.5"></asp:ListItem>
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td> &nbsp; </td>
                <td> 
                    <asp:ImageButton ID="imgbtnAno" runat="server" ImageAlign="Left" ImageUrl="~/images/derecha2.png"
                        ToolTip="Agrega nuevo año" CausesValidation="False" /> </td>
                
                <td> &nbsp; </td>
                <td class="FieldCaptionTD" align="left"> EDAD MINIMA DE VACAS : </td>
                <td>
                    <asp:DropDownList ID="ddlEdadV" runat="server" Style="height: 22px" AppendDataBoundItems="True"
                        Height="24px" Width="60px" TabIndex="0" AutoPostBack = "true" > 
                        <asp:ListItem Value="0.5"></asp:ListItem>
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td> &nbsp; </td>
                <td> &nbsp; </td>
                <td> &nbsp; </td>
                <td> &nbsp; </td>
                <td> &nbsp; </td>
            </tr>
        </table>

        <p> <asp:Button ID="btnEmpadre" runat="server" TabIndex="9" Text="Nuevo Empadre" CssClass="BotonesMedianos" /> </p>

        <table id="tblGrids">
            <tr>
                <td align="center" class="FormHeaderTD"> SEMENTALES </td>
                <td colspan="2" align="center" class="FormHeaderTD"> PIES DE CRIA </td>
            </tr>
            <tr>
                <td> <asp:TextBox ID="txtIndexEmp" runat="server" Visible ="False" ></asp:TextBox> </td>
                <td> <asp:Label ID="lblError" runat="server" CssClass="MaskedEditFocus" 
                     Font-Bold="True" Font-Size="13px"></asp:Label> </td>
                <td align = "center"  > 
                    <asp:CheckBox ID="chkPropV" runat="server" Text="PROPIEDAD &quot;STA FE&quot;"
                        CssClass="FieldCaptionTD" AutoPostBack="True" /> 
                    <asp:Button ID="btnGrabaSelecc" runat="server" TabIndex="0" Text="Agrega" CssClass="Botones" ToolTip ="Graba vacas seleccionadas" 
                        OnClientClick="return confirm('Este proceso agrega vacas\nal empadre actual\n¿Desea agregarlos?')" /> </td>
            </tr>
            <tr>
                <td valign="top">
                    <asp:GridView ID="gvEmpadre" runat="server" AutoGenerateColumns="False" PageSize="20"
                        CellPadding="4" ForeColor="#333333" GridLines="None" DataKeyNames="empadreId,fechaini,fechafin" >
                        <PagerSettings PageButtonCount="25" />
                        <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                        <Columns>
                            <asp:TemplateField>
                                <ItemTemplate>
                                    <asp:ImageButton ID="Seleccion" runat="server" ImageUrl="~/images/check14x13_blue.png"
                                        CommandName="Select" ToolTip="Ver Vacas" />
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField>
                                <ItemTemplate>
                                    <asp:ImageButton ID="Editar" runat="server" ImageUrl="~/images/editar.gif" 
                                        CommandName="Edit" ToolTip="Editar Semental" />
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField>
                                <ItemTemplate>
                                    <asp:ImageButton ID="Eliminar" runat="server" ImageUrl="~/images/eliminar.gif" 
                                        CommandName="Delete" ToolTip="Eliminar registro" 
                                        OnClientClick="return confirm('La eliminación del SEMENTAL incluye\ntodas las PIE DE CRIA asociadas\n¿Desea eliminar el elemento?')" />
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField>
                                <ItemTemplate>
                                    <asp:HyperLink ID="hlCrias" runat="server" ImageUrl="~/images/attibutes.png" 
                                    NavigateUrl='<%# Eval("ToroId", "~/Registro/_crias.aspx?animal={0}") %>' 
                                        ToolTip="Crias del animal" CssClass="crias" /> 
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField DataField="empadreId" HeaderText="# Emp" SortExpression="empadreId" Visible="False" />
                            <asp:TemplateField SortExpression="toro" HeaderText="">
                                <ItemTemplate>
                                    <asp:HyperLink ID="hlToro" runat="server" ToolTip="Detalles del animal" NavigateUrl='<%# Eval("ToroId", "~/Registro/detalles.aspx?animal={0}") %>'
                                        Text='<%# Eval("toro") %>' CssClass="detalles"></asp:HyperLink>
                                </ItemTemplate>
                                <ItemStyle Width="80px" />
                            </asp:TemplateField>
                            <asp:BoundField DataField="nombre" HeaderText="TOROS" SortExpression="nombre" HtmlEncode="False">
                                <ItemStyle Width="120px" />
                            </asp:BoundField>
                            <asp:BoundField DataField="toroId" HeaderText="ID" SortExpression="toroId">
                                <ItemStyle Width="40px" />
                            </asp:BoundField>
                            <asp:BoundField DataField="gan_cor" HeaderText="G/C" SortExpression="gan_cor" Visible="False">
                                <ItemStyle Width="40px" />
                            </asp:BoundField>
                            <asp:BoundField DataField="ubicacion" HeaderText="Ubicacion" SortExpression="ubicacion" />
                        </Columns>
                        <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                        <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                        <EmptyDataTemplate>
                            No Hay Datos.
                        </EmptyDataTemplate>
                        <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                        <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                        <EditRowStyle BackColor="#999999" />
                        <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                    </asp:GridView>
                </td>
                <td valign="top">
                    <asp:GridView ID="gvEmpMov" runat="server" AutoGenerateColumns="False" PageSize="20"
                        CellPadding="4" ForeColor="#333333" GridLines="None" DataKeyNames="empadreId,vacaId" >
                        <PagerSettings PageButtonCount="25" />
                        <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                        <Columns>
                            <asp:TemplateField>
                                <ItemTemplate>
                                    <asp:ImageButton ID="Editar" runat="server" ImageUrl="~/images/editar.gif" 
                                        CommandName="Edit" ToolTip="Editar Pie de Cria" />
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField>
                                <ItemTemplate>
                                    <asp:ImageButton ID="Eliminar" runat="server" ImageUrl="~/images/eliminar.gif" 
                                        CommandName="Delete" ToolTip="Eliminar registro" 
                                        OnClientClick="return confirm('Borrado de PIE DE CRIA\n¿Desea eliminar el elemento?')" />
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField>
                                <ItemTemplate>
                                    <asp:HyperLink ID="hlCrias" runat="server" ImageUrl="~/images/attibutes.png" 
                                    NavigateUrl='<%# Eval("VacaId", "~/Registro/_crias.aspx?animal={0}") %>' 
                                        ToolTip="Crias del animal" CssClass="crias" /> 
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField DataField="empadreId" HeaderText="# Emp" SortExpression="empadreId" Visible="False" />
                            <asp:TemplateField SortExpression="vaca" HeaderText="">
                                <ItemTemplate>
                                    <asp:HyperLink ID="hlVaca" runat="server" ToolTip="Detalles del animal" NavigateUrl='<%# Eval("VacaId", "~/Registro/detalles.aspx?animal={0}") %>'
                                        Text='<%# Eval("vaca") %>' CssClass="detalles"></asp:HyperLink>
                                </ItemTemplate>
                                <ItemStyle Width="80px" />
                            </asp:TemplateField>
                            <asp:BoundField DataField="nombre" HeaderText="ASIGNADAS" SortExpression="nombre" HtmlEncode="False">
                                <ItemStyle Width="120px" />
                            </asp:BoundField>
                            <asp:BoundField DataField="vacaId" HeaderText="ID" SortExpression="vacaId">
                                <ItemStyle Width="40px" />
                            </asp:BoundField>
                            <asp:BoundField DataField="fechaini" DataFormatString="&quot;{0:d}&quot;" HeaderText="Fecha Inicio"
                                SortExpression="fechaini" Visible="False">
                                <ItemStyle Width="140px" />
                            </asp:BoundField>
                            <asp:BoundField DataField="fechafin" HeaderText="Fecha Fin" SortExpression="fechafin"
                                DataFormatString="&quot;{0:d}&quot;" Visible="False">
                                <ItemStyle Width="140px" />
                            </asp:BoundField>
                        </Columns>
                        <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                        <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                        <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                        <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                        <EditRowStyle BackColor="#999999" />
                        <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                    </asp:GridView>
                </td>
                <td valign="top">
                    <asp:GridView ID="gvVacas" runat="server" AutoGenerateColumns="False" CellPadding="4"
                        RowStyle-HorizontalAlign="Left" PageSize="300"
                        ForeColor="#333333" GridLines="None" DataKeyNames="animalID,cveAnimal,nombre">
                        <PagerSettings PageButtonCount="20" Position="TopAndBottom" />
                        <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                        <Columns>
                            <asp:TemplateField HeaderText="">
                                <HeaderTemplate>
                                    <asp:CheckBox ID="chkSelectAll1" runat="server" AutoPostBack="True" 
                                        oncheckedchanged="chkSelectAll1_CheckedChanged"  />
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <asp:CheckBox ID="chkItemSelect1" runat="server" AutoPostBack="False" />
                                </ItemTemplate>
                                <EditItemTemplate>
                                </EditItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField  Visible="False">
                                <ItemTemplate>
                                    <asp:ImageButton ID="Seleccion" runat="server" ImageUrl="~/images/check14x13_blue.png"
                                        CommandName="Select" ToolTip="Elija Vaca" />
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField>
                                <ItemTemplate>
                                    <asp:HyperLink ID="hlCrias" runat="server" ImageUrl="~/images/attibutes.png" 
                                        NavigateUrl='<%# Eval("AnimalId", "~/Registro/_crias.aspx?animal={0}") %>' 
                                        ToolTip="Crias del animal" CssClass="crias" /> 
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField SortExpression="cveAnimal" > 
                                <ItemTemplate>
                                    <asp:HyperLink ID="hlToro" runat="server" ToolTip="Detalles del animal" NavigateUrl='<%# Eval("animalID", "~/Registro/detalles.aspx?animal={0}") %>'
                                        Text='<%# Eval("cveAnimal") %>' CssClass="detalles"></asp:HyperLink>
                                </ItemTemplate>
                                <ItemStyle Width="80px" />
                            </asp:TemplateField>
                            <asp:BoundField DataField="nombre" HeaderText="L I B R E S" 
                                HeaderStyle-HorizontalAlign ="Left" HtmlEncode="False" >
                                <HeaderStyle HorizontalAlign="Left" />
                            </asp:BoundField>
                            <asp:BoundField DataField="animalID" HeaderText="ID" />
                        </Columns>
                        <FooterStyle BackColor="#5D7B9D" ForeColor="White" Font-Bold="true" />
                        <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                        <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                        <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                        <EditRowStyle BackColor="#999999" />
                        <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                    </asp:GridView>
                </td>
            </tr>
            <tr>
                <td> &nbsp; </td>
                <td> &nbsp; </td>
                <td> &nbsp; </td>
            </tr>
        </table>
    </asp:Panel>


    <div align="center" style="width: 100%">
        <div style="width: 40%; position: relative; float: left; top: 0px; left: 0px;">
            <asp:Panel ID="pnlEmpadre" runat="server" BorderWidth="1px" Style="z-index: 101;
                left: 5px; position: relative; top: 0px; width: 350px; height: 270px;">
                <table id="tblEmpadre" style="width: 313px">
                    <tr>
                        <td align="center" class="FormHeaderTD"> SEMENTAL </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="lblNumEmpT" runat="server" Visible="False"></asp:Label>
                        </td>
                        <td> &nbsp; </td>
                        <td> &nbsp; </td>
                    </tr>
                    <tr>
                        <td class="FieldCaptionTD" align="left"> Clave : </td>
                        <td>
                            <asp:TextBox ID="txtToro" runat="server" MaxLength="10" TabIndex="2" Width="90px"
                                ToolTip="Clave Toro" AutoPostBack="False" Enabled="False">0</asp:TextBox>
                        </td>
                        <td> &nbsp; </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="lblToroId" runat="server" Visible="False"></asp:Label>
                        </td>
                        <td>
                            <asp:Label ID="lblNomToro" runat="server"></asp:Label>
                        </td>
                        <td> &nbsp; </td>
                    </tr>
                    <tr>
                        <td class="FieldCaptionTD" align="left"> Fecha Inicio : </td>
                        <td>
                            <asp:TextBox ID="txtFIT" runat="server" BorderWidth="1px" MaxLength="10" Width="80px"
                                TabIndex="3" AutoPostBack="True" />
                        </td>
                        <td>
                            <asp:ImageButton ID="ImgBntCal1" runat="server" CausesValidation="False" ImageUrl="~/images/Calendar_scheduleHS.png"
                                TabIndex="4" ImageAlign="Left" />
                            <ajaxToolkit:MaskedEditExtender ID="MaskedEditExtender1" runat="server" TargetControlID="txtFIT"
                                Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left" ErrorTooltipEnabled="True"
                                MessageValidatorTip="true" OnFocusCssClass="MaskedEditFocus" OnInvalidCssClass="MaskedEditError" />
                            <ajaxToolkit:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="txtFIT"
                                PopupButtonID="ImgBntCal1" TodaysDateFormat="dd-MM-yyyy" />
                            <ajaxToolkit:MaskedEditValidator ID="MaskedEditValidator1" runat="server" ControlExtender="MaskedEditExtender1"
                                ControlToValidate="txtFIT" Display="Dynamic" TooltipMessage="dd/mm/aaaa" ErrorMessage="ERROR"
                                EmptyValueMessage="La fecha es requerida" EmptyValueBlurredText="Fecha requerida"
                                ValidationGroup="MKE" InvalidValueMessage="Fecha Invalida" InvalidValueBlurredMessage="Fecha invalida"
                                ForeColor="Maroon" />
                        </td>
                    </tr>
                    <tr>
                        <td class="FieldCaptionTD" align="left"> Fecha Fin : </td>
                        <td>
                            <asp:TextBox ID="txtFFT" runat="server" BorderWidth="1px" MaxLength="10" Width="80px"
                                TabIndex="5" AutoPostBack="True"> </asp:TextBox>
                        </td>
                        <td>
                            <asp:ImageButton ID="ImgBntCal2" runat="server" CausesValidation="False" ImageUrl="~/images/Calendar_scheduleHS.png"
                                TabIndex="9" ImageAlign="Left" />
                            <ajaxToolkit:MaskedEditExtender ID="MaskedEditExtender2" runat="server" TargetControlID="txtFFT"
                                Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left" ErrorTooltipEnabled="True"
                                MessageValidatorTip="true" OnFocusCssClass="MaskedEditFocus" OnInvalidCssClass="MaskedEditError" />
                            <ajaxToolkit:CalendarExtender ID="CalendarExtender2" runat="server" TargetControlID="txtFFT"
                                PopupButtonID="ImgBntCal2" TodaysDateFormat="dd-MM-yyyy" />
                            <ajaxToolkit:MaskedEditValidator ID="MaskedEditValidator2" runat="server" ControlExtender="MaskedEditExtender2"
                                ControlToValidate="txtFFT" Display="Dynamic" TooltipMessage="dd/mm/aaaa" ErrorMessage="ERROR"
                                EmptyValueMessage="La fecha es requerida" EmptyValueBlurredText="Fecha requerida"
                                ValidationGroup="MKE" InvalidValueMessage="Fecha Invalida" InvalidValueBlurredMessage="Fecha invalida"
                                ForeColor="Maroon" />
                        </td>
                    </tr>
                    <tr>
                        <td class="FieldCaptionTD" align="left"> Ganad / Corral : </td>
                        <td>
                            <asp:DropDownList ID="ddlGanCor" runat="server" AppendDataBoundItems="True" Style="height: 22px"
                                Height="24px" Width="90px" TabIndex="5">
                                <asp:ListItem Text="Corral" Value="C"> </asp:ListItem>
                                <asp:ListItem Text="Ganaderia" Value="G"></asp:ListItem>
                            </asp:DropDownList>
                        </td>
                        <td> &nbsp; </td>
                    </tr>
                    <tr>
                        <td class="FieldCaptionTD" align="left"> Ubicacion : </td>
                        <td colspan="2">
                            <asp:DropDownList ID="ddlUbicacion" runat="server" AppendDataBoundItems="True" DataSourceID="odsUbicacion"
                                DataTextField="catnom" DataValueField="catcve" ToolTip="Selecciona la ubicación"
                                TabIndex="6">
                                <asp:ListItem Selected="True"></asp:ListItem>
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:ObjectDataSource ID="odsUbicacion" runat="server" OldValuesParameterFormatString="original_{0}"
                                SelectMethod="GetCatGralBycattip" TypeName="DataSet_ohlTableAdapters.catalogo_generalTableAdapter">
                                <SelectParameters>
                                    <asp:Parameter DefaultValue="U" Name="cattip" Type="String" />
                                </SelectParameters>
                            </asp:ObjectDataSource>
                        </td>
                        <td> &nbsp; </td>
                        <td> &nbsp; </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <asp:CheckBox ID="chkPropT" runat="server" Text="PROPIEDAD &quot;STA. FE DEL CAMPO&quot;"
                                CssClass="FieldCaptionTD" AutoPostBack="True" />
                        </td>
                        <td> &nbsp; </td>
                    </tr>
                    <tr>
                        <td> &nbsp; </td>
                        <td> &nbsp; </td>
                        <td> &nbsp; </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Button ID="btnGraba1" runat="server" TabIndex="7" Text="Grabar" CssClass="Botones" />
                        </td>
                        <td>
                            <asp:Button ID="btnCancela1" runat="server" TabIndex="10" Text="Cancelar" CssClass="Botones" />
                        </td>
                        <td> &nbsp; </td>
                    </tr>
                </table>
            </asp:Panel>
        </div>


        <div style="width: 40%; position: relative; float: right;">
            <asp:Panel ID="pnlEmpMov" runat="server" BorderWidth="1px" Style="z-index: 102; left: 0px;
                position: relative; top: 0px; width: 310px; height: 240px;">
                <table id="tblEmpMov" style="width: 280px">
                    <tr>
                        <td class="FormHeaderTD"> VACA </td>
                        <td> &nbsp; </td>
                        <td> &nbsp; </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="lblNumEmpV" runat="server" Visible="False"></asp:Label>
                        </td>
                        <td> &nbsp; </td>
                        <td> &nbsp; </td>
                    </tr>
                    <tr>
                        <td class="FieldCaptionTD" align="left"> Clave : </td>
                        <td>
                            <asp:TextBox ID="txtVaca" runat="server" MaxLength="10" TabIndex="11" ToolTip="Clave Vaca"
                                Width="90px" Enabled="False">0</asp:TextBox>
                        </td>
                        <td> &nbsp; </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="lblVacaId" runat="server" Visible="False"></asp:Label>
                        </td>
                        <td colspan="2">
                            <asp:Label ID="lblNomVaca" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td class="FieldCaptionTD" align="left"> Empadre : </td>
                        <td colspan="2">
                            <asp:Label ID="lblFechas" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td class="FieldCaptionTD" align="left"> Fecha Inicio : </td>
                        <td>
                            <asp:TextBox ID="txtFIV" runat="server" MaxLength="10" TabIndex="12" ToolTip="Fecha de inicio"
                                Width="80px" AutoPostBack="True">0</asp:TextBox>
                        </td>
                        <td>
                            <asp:ImageButton ID="ImgBntCal3" runat="server" CausesValidation="False" ImageUrl="~/images/Calendar_scheduleHS.png"
                                TabIndex="13" ImageAlign="Left" />
                            <ajaxToolkit:MaskedEditExtender ID="MaskedEditExtender3" runat="server" TargetControlID="txtFIV"
                                Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left" ErrorTooltipEnabled="True"
                                CultureAMPMPlaceholder="" CultureCurrencySymbolPlaceholder="" CultureDateFormat=""
                                CultureDatePlaceholder="" CultureDecimalPlaceholder="" CultureThousandsPlaceholder=""
                                CultureTimePlaceholder="" Enabled="True" />
                            <ajaxToolkit:CalendarExtender ID="CalendarExtender3" runat="server" TargetControlID="txtFIV"
                                PopupButtonID="ImgBntCal3" TodaysDateFormat="dd-MM-yyyy" Enabled="True" />
                            <ajaxToolkit:MaskedEditValidator ID="MaskedEditValidator3" runat="server" ControlExtender="MaskedEditExtender3"
                                ControlToValidate="txtFIV" Display="Dynamic" TooltipMessage="dd/mm/aaaa" ErrorMessage="ERROR"
                                EmptyValueMessage="La fecha es requerida" EmptyValueBlurredText="Fecha requerida"
                                ValidationGroup="MKE" InvalidValueMessage="Fecha Invalida" InvalidValueBlurredMessage="Fecha invalida"
                                ForeColor="Maroon" />
                        </td>
                    </tr>
                    <tr>
                        <td class="FieldCaptionTD" align="left"> Fecha Fin : </td>
                        <td>
                            <asp:TextBox ID="txtFFV" runat="server" MaxLength="10" TabIndex="14" ToolTip="Fecha de fin"
                                Width="80px" AutoPostBack="True">0</asp:TextBox>
                        </td>
                        <td>
                            <asp:ImageButton ID="ImgBntCal4" runat="server" CausesValidation="False" ImageUrl="~/images/Calendar_scheduleHS.png"
                                TabIndex="15" ImageAlign="Left" />
                            <ajaxToolkit:MaskedEditExtender ID="MaskedEditExtender4" runat="server" TargetControlID="txtFFV"
                                Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left" ErrorTooltipEnabled="True"
                                MessageValidatorTip="true" OnFocusCssClass="MaskedEditFocus" OnInvalidCssClass="MaskedEditError" />
                            <ajaxToolkit:CalendarExtender ID="CalendarExtender4" runat="server" TargetControlID="txtFFV"
                                PopupButtonID="ImgBntCal4" TodaysDateFormat="dd-MM-yyyy" />
                            <ajaxToolkit:MaskedEditValidator ID="MaskedEditValidator4" runat="server" ControlExtender="MaskedEditExtender4"
                                ControlToValidate="txtFFV" Display="Dynamic" TooltipMessage="dd/mm/aaaa" ErrorMessage="ERROR"
                                EmptyValueMessage="La fecha es requerida" EmptyValueBlurredText="Fecha requerida"
                                ValidationGroup="MKE" InvalidValueMessage="Fecha Invalida" InvalidValueBlurredMessage="Fecha invalida"
                                ForeColor="Maroon" />
                        </td>
                    </tr>
                    <tr>
                        <td> &nbsp; </td>
                        <td> &nbsp; </td>
                        <td> &nbsp; </td>
                    </tr>
                    <tr>
                        <td colspan="3">
                            <asp:CheckBox ID="chkPropVV" runat="server" Text="PROPIEDAD &quot;STA. FE DEL CAMPO&quot;"
                                CssClass="FieldCaptionTD" AutoPostBack="True" Visible="False" />
                        </td>
                    </tr>
                    <tr>
                        <td> &nbsp; </td>
                        <td> &nbsp; </td>
                        <td> &nbsp; </td>
                    </tr>
                    <tr>
                        <td> &nbsp; </td>
                        <td>
                            <asp:Button ID="btnGraba2" runat="server" TabIndex="17" Text="Grabar" CssClass="Botones" />
                        </td>
                        <td>
                            <asp:Button ID="btnCancela2" runat="server" TabIndex="9" Text="Cancelar" CssClass="Botones" />
                        </td>
                    </tr>
                </table>
            </asp:Panel>
        </div>
    </div>


    <br />    <br />
    <!-- <asp:Panel ID="pnlToros" runat="server" 
            style="Z-INDEX: 102; LEFT: -2px; POSITION: relative; TOP: 0px; width: 380px; height: 150px;"> -->
    <p>    </p>
    <table id="tblAnimal">
        <tr>
            <td valign="top">
                <asp:GridView ID="gvToros" runat="server" AutoGenerateColumns="False" CellPadding="4"
                    RowStyle-HorizontalAlign="Left" PageSize="300"
                    ForeColor="#333333" GridLines="None" DataKeyNames="animalID,cveAnimal,nombre">
                    <PagerSettings PageButtonCount="20" Position="TopAndBottom" />
                    <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                    <Columns>
                        <asp:TemplateField>
                            <ItemTemplate>
                                <asp:ImageButton ID="Seleccion" runat="server" ImageUrl="~/images/check14x13_blue.png"
                                    CommandName="Select" ToolTip="Elija Toro" />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField>
                            <ItemTemplate>
                                <asp:HyperLink ID="hlCrias" runat="server" ImageUrl="~/images/attibutes.png" 
                                    NavigateUrl='<%# Eval("AnimalId", "~/Registro/_crias.aspx?animal={0}") %>' 
                                    ToolTip="Crias del animal" CssClass="crias" /> 
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField SortExpression="cveAnimal" HeaderText="TOROS" > 
                            <ItemTemplate>
                                <asp:HyperLink ID="hlToro" runat="server" ToolTip="Detalles del animal" NavigateUrl='<%# Eval("animalID", "~/Registro/detalles.aspx?animal={0}") %>'
                                    Text='<%# Eval("cveAnimal") %>' CssClass="detalles"></asp:HyperLink>
                            </ItemTemplate>
                            <ItemStyle Width="80px" />
                        </asp:TemplateField>
                        <asp:BoundField DataField="nombre" HeaderText="LIBRES" HeaderStyle-HorizontalAlign ="Left" HtmlEncode="False" />
                        <asp:BoundField DataField="animalID" HeaderText="ID" />
                    </Columns>
                    <FooterStyle BackColor="#5D7B9D" ForeColor="White" Font-Bold="true" />
                    <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                    <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                    <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                    <EditRowStyle BackColor="#999999" />
                    <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                </asp:GridView>
            </td>
            <td valign="top">
                <asp:GridView ID="gvVacas2" runat="server" AutoGenerateColumns="False" CellPadding="4"
                    RowStyle-HorizontalAlign="Left" PageSize="300"
                    ForeColor="#333333" GridLines="None" DataKeyNames="animalID,cveAnimal,nombre">
                    <PagerSettings PageButtonCount="20" Position="TopAndBottom" />
                    <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                    <Columns>
                        <asp:TemplateField HeaderText="">
                            <HeaderTemplate>
                                <asp:CheckBox ID="chkSelectAll1" runat="server" AutoPostBack="True" 
                                    oncheckedchanged="chkSelectAll1_CheckedChanged"  />
                            </HeaderTemplate>
                            <ItemTemplate>
                                <asp:CheckBox ID="chkItemSelect1" runat="server" AutoPostBack="True" 
                                    oncheckedchanged="chkItemSelect1_CheckedChanged"  />
                            </ItemTemplate>
                            <EditItemTemplate>
                            </EditItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField>
                            <ItemTemplate>
                                <asp:ImageButton ID="Seleccion" runat="server" ImageUrl="~/images/check14x13_blue.png"
                                    CommandName="Select" ToolTip="Elija Vaca" />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField>
                            <ItemTemplate>
                                <asp:HyperLink ID="hlCrias" runat="server" ImageUrl="~/images/attibutes.png" 
                                    NavigateUrl='<%# Eval("AnimalId", "~/Registro/_crias.aspx?animal={0}") %>' 
                                    ToolTip="Crias del animal" CssClass="crias" /> 
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField SortExpression="cveAnimal" HeaderText="VACAS" > 
                            <ItemTemplate>
                                <asp:HyperLink ID="hlToro" runat="server" ToolTip="Detalles del animal" NavigateUrl='<%# Eval("animalID", "~/Registro/detalles.aspx?animal={0}") %>'
                                    Text='<%# Eval("cveAnimal") %>' CssClass="detalles"></asp:HyperLink>
                            </ItemTemplate>
                            <ItemStyle Width="80px" />
                        </asp:TemplateField>
                        <asp:BoundField DataField="nombre" HeaderText="LIBRES" HeaderStyle-HorizontalAlign ="Left" HtmlEncode="False" />
                        <asp:BoundField DataField="animalID" HeaderText="ID" />
                    </Columns>
                    <FooterStyle BackColor="#5D7B9D" ForeColor="White" Font-Bold="true" />
                    <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                    <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                    <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                    <EditRowStyle BackColor="#999999" />
                    <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                </asp:GridView>
            </td>
            <td valign="top">
                <asp:GridView ID="gvCrias2" runat="server" AutoGenerateColumns="False" DataKeyNames="AnimalId"
                    CellPadding="4" ForeColor="#333333" GridLines="None" PageSize="20">
                    <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                    <Columns>
                        <asp:BoundField DataField="sexo" SortExpression="sexo" />
                        <asp:BoundField DataField="numero" SortExpression="numero" />
                        <asp:BoundField DataField="letra" SortExpression="letra" />
                        <asp:BoundField DataField="ano" SortExpression="ano">
                            <ItemStyle Width="40px" />
                        </asp:BoundField>
                        <asp:BoundField DataField="nombre" HeaderText="CRIAS" SortExpression="nombre" />
                        <asp:BoundField DataField="AnimalId" HeaderText="ID" InsertVisible="False" ReadOnly="True"
                            SortExpression="AnimalId">
                            <ItemStyle Width="40px" />
                        </asp:BoundField>
                    </Columns>
                    <FooterStyle BackColor="#5D7B9D" ForeColor="White" Font-Bold="True" />
                    <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                    <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                    <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                    <EditRowStyle BackColor="#999999" />
                    <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                </asp:GridView>
            </td>
        </tr>
        <tr>
            <td> &nbsp; </td>
            <td> &nbsp; </td>
            <td> &nbsp; </td>
        </tr>
    </table>

    <!-- </asp:Panel> 
    <asp:Label ID="lblAno" runat="server" Text="AÑO EMPADRE :  " class="FieldCaptionTD" align="left" ></asp:Label>
        -->
</asp:Content>
